Network processing functions performed by a network processor generally include parsing and examination of information stored in network buffers. Network buffers can be viewed as having two parts: a descriptor and a body. The descriptor is used to store control information about the network buffer and the contents of the body. The body is used store network data (e.g., packets, portions of packets, cells and so forth). Typically, a relatively small amount of the leading data stored in the body of the network buffer (such as header information) is of interest to an application executing on the network processor, while the rest of the network data is merely an “opaque capsule” that is passed from a receive port to some exit port. It is fairly uncommon to pass the contents of the network buffer body through such processing without modifying the leading data in some way.
Quite often, accessing (i.e., reading or writing) the descriptor portion of a network buffer is a necessary part of the data processing. If only a small part of the body is accessed, as is typically the case, the access to the descriptor is a significant percentage of the total buffer memory access for network data processing.
Typically, a pool of available network buffers is managed with a linked list (or circular ring) of descriptors. There are various types of pools, e.g., shared or flow-specific controlled. In a flow-specific controlled pool scheme, each network traffic flow owns a collection of buffers for the use within its own flow only.
When a processing resource of the network processor needs a network buffer (and therefore a descriptor), a descriptor is taken from head of the list. When a network buffer is retired from use by a processing resource and the descriptor for that network buffer is no longer needed, the descriptor is returned to the pool list, usually being placed at the tail of the list.